package com.huakang.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * medbuy
 * @author 
 */
public class Medbuy implements Serializable {
    private Integer mbid;

    private String mbname;

    private Double mbcost;

    private Integer mbnum;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date mbprotime;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date buytime;

    private static final long serialVersionUID = 1L;

    public Integer getMbid() {
        return mbid;
    }

    public void setMbid(Integer mbid) {
        this.mbid = mbid;
    }

    public String getMbname() {
        return mbname;
    }

    public void setMbname(String mbname) {
        this.mbname = mbname;
    }

    public Double getMbcost() {
        return mbcost;
    }

    public void setMbcost(Double mbcost) {
        this.mbcost = mbcost;
    }

    public Integer getMbnum() {
        return mbnum;
    }

    public void setMbnum(Integer mbnum) {
        this.mbnum = mbnum;
    }

    public Date getMbprotime() {
        return mbprotime;
    }

    public void setMbprotime(Date mbprotime) {
        this.mbprotime = mbprotime;
    }

    public Date getBuytime() {
        return buytime;
    }

    public void setBuytime(Date buytime) {
        this.buytime = buytime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Medbuy other = (Medbuy) that;
        return (this.getMbid() == null ? other.getMbid() == null : this.getMbid().equals(other.getMbid()))
            && (this.getMbname() == null ? other.getMbname() == null : this.getMbname().equals(other.getMbname()))
            && (this.getMbcost() == null ? other.getMbcost() == null : this.getMbcost().equals(other.getMbcost()))
            && (this.getMbnum() == null ? other.getMbnum() == null : this.getMbnum().equals(other.getMbnum()))
            && (this.getMbprotime() == null ? other.getMbprotime() == null : this.getMbprotime().equals(other.getMbprotime()))
            && (this.getBuytime() == null ? other.getBuytime() == null : this.getBuytime().equals(other.getBuytime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMbid() == null) ? 0 : getMbid().hashCode());
        result = prime * result + ((getMbname() == null) ? 0 : getMbname().hashCode());
        result = prime * result + ((getMbcost() == null) ? 0 : getMbcost().hashCode());
        result = prime * result + ((getMbnum() == null) ? 0 : getMbnum().hashCode());
        result = prime * result + ((getMbprotime() == null) ? 0 : getMbprotime().hashCode());
        result = prime * result + ((getBuytime() == null) ? 0 : getBuytime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", mbid=").append(mbid);
        sb.append(", mbname=").append(mbname);
        sb.append(", mbcost=").append(mbcost);
        sb.append(", mbnum=").append(mbnum);
        sb.append(", mbprotime=").append(mbprotime);
        sb.append(", buytime=").append(buytime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}